<?php //header("Refresh: 5");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script type="text/javascript" src="<?php echo base_url();?>js/prototype.js"></script>
	<script type="text/javascript" src="<?php echo base_url();?>js/comet.js"></script>
<noscript><style type="text/css">#app_header, div.wrapper { display: none }</style></noscript>  
</head>
<body onLoad="WebApp.WebMain();">
	<form action="" method="get" onSubmit="WebApp.doRequest($('word').value,$('msg_user').value);$('word').value='';return false;">
    <div>
    	<?php foreach($chat as $val){
			$hour = ($val["hour"] < 10 ? "0" . $val["hour"] : $val["hour"]);
			$minutes = ($val["minutes"] < 10 ? "0" . $val["minutes"] : $val["minutes"]);
			$seconds = ($val["seconds"] < 10 ? "0" . $val["seconds"] : $val["seconds"]);
			//echo "<FONT >($hour:$minutes:$seconds)</FONT>\r\n";
			echo "<FONT><span style='font-weight:bold;'>" . strip_tags(stripslashes($val["username"])) . "</span>  " . $val["msg"] . "</FONT><BR>\r\n";
		}?>
    </div>
    <div id="content"></div>
    <div style="margin-top:10px; position:absolute; bottom:10px;">
        <select name="msg_user" id="msg_user">
            <option value="0">请选择用户</option>
            <?php foreach($user as $val){?>
                <option value="<?php echo $val['m_id'].','.$val['m_username']?>"><?php echo $val['m_username']?></option>
            <?php }?>
        </select>
        <input type="text" name="word" id="word" style="width:100px; margin-top:5px;" />
        <input type="submit" name="submit" value="提 交" style="margin-top:5px;" value="Send" />
    </div>
    </form>
    
</body> 
</html> 